<div class="ui-form ui-widget ui-widget-content ui-corner-all">
    <div class="ui-widget-header ui-corner-top">
    <?php echo  $this->translate('Edit album'); ?>
    </div>
    <?php echo  $this->form ?>
</div>

<div class="ui-form ui-widget ui-widget-content ui-corner-all">
    <div class="ui-widget-header ui-corner-top">
    <?php echo  $this->translate('Upload picture'); ?>
    </div>
    <?php echo  $this->pictureUploadForm ?>
</div>





<div class="ui-grid ui-widget ui-widget-content ui-corner-all">
<div class="ui-grid-header ui-widget-header ui-corner-top"><?php echo  $this->translate('Pictures'); ?></div>
<table class="ui-grid-content ui-widget-content" >
<thead>
    <tr>
        <th class="ui-state-default"><?php echo $this->translate('Picture'); ?></th>
        <th class="ui-state-default"><?php echo $this->translate('Filename'); ?></th>
        <th class="ui-state-default"><?php echo $this->translate('Created at'); ?></th>
        <th class="ui-state-default"><?php echo $this->translate('Edit'); ?></th>
    </tr>
</thead>
<tbody>
    <?php if(count($this->pictures)>0): foreach($this->pictures as $pic):?>
    <tr>
        <td class="ui-widget-content">
           <a href="<?php
                echo $this->url(
                    array('module' => 'content', 'controller'=>'album', 'action'=>'image', 'picture_id'=>$pic['id']),
                    'default', true)
                ?>" rel="img-dialog">
                    <img src="<?php
                        echo $this->url(
                            array('module' => 'content', 'controller'=>'album', 'action'=>'thumb', 'picture_id'=>$pic['id']    ),
                        'default', true)
                    ?>"/>
            </a>
        </td>
        <td class="ui-widget-content"><?php echo $pic['filename']; ?></td>
        <td class="ui-widget-content"><?php echo $pic['created_at']; ?></td>
        <td class="ui-widget-content">

            <?php echo $pic['position']; ?>

            <a href="<?php
            echo $this->url(
                array('module' => 'content', 'controller'=>'picture', 'action'=>'promote', 'picture_id'=>$pic['id']),
                'default', true)
                ?>"><?php echo $this->translate('Up'); ?></a>

            <a href="<?php
            echo $this->url(
                array('module' => 'content', 'controller'=>'picture', 'action'=>'demote', 'picture_id'=>$pic['id']),
                'default', true)
                ?>"><?php echo $this->translate('Down'); ?></a>


            <a href="<?php
            echo $this->url(
                array('module' => 'content', 'controller'=>'picture', 'action'=>'delete', 'picture_id'=>$pic['id']),
                'default', true)
                ?>"><?php echo $this->translate('Delete'); ?></a>

        </td>
    </tr>
    <?php endforeach; else:  ?>
    <tr>
        <td class="ui-widget-content ui-grid-empty" colspan="4">
            <?php echo $this->translate('No pictures'); ?>
        </td>
    </tr>
    <?php endif;?>
</tbody>
</table>
<div class="ui-grid-footer ui-widget-header ui-corner-bottom ui-helper-clearfix">
    foot
</div>
</div>
